package routers

import (
	beego "github.com/beego/beego/v2/server/web"
	"live/controllers"
)

func init() {
	beego.Router("/", &controllers.MainController{})
	// 添加
	beego.Router("/anchor/add", &controllers.AnchorController{}, "post:Add")
	// 列表
	beego.Router("/anchor/list", &controllers.AnchorController{}, "get:List")
	// 删除
	beego.Router("/anchor/delete", &controllers.AnchorController{}, "get:Delete")
	// 详情
	beego.Router("/anchor/info", &controllers.AnchorController{}, "get:Info")
	// 修改
	beego.Router("/anchor/update", &controllers.AnchorController{}, "post:Update")
	// 文件上传
	beego.Router("/upload", &controllers.AnchorController{}, "post:Upload")
	// 登录
	beego.Router("/user/login", &controllers.UserController{}, "post:Login")
	// 注册
	beego.Router("/user/register", &controllers.UserController{}, "post:Register")
	// 排行榜
	beego.Router("/rank", &controllers.AnchorController{}, "get:Rank")
}
